// $ANTLR 3.4 C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g 2012-10-25 02:54:30

    package pl.BasicLexer;
    import java.util.HashMap;
    import java.io.IOException;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.BufferedReader;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class BasicLexer extends Lexer {
    public static final int EOF=-1;
    public static final int DELIMITADORES=4;
    public static final int DIGITO=5;
    public static final int DIV=6;
    public static final int ESPACIO=7;
    public static final int INTEGER=8;
    public static final int MAS=9;
    public static final int MENOS=10;
    public static final int MULT=11;
    public static final int NUEVALINEA_LINUX=12;
    public static final int NUEVALINEA_WINDOWS=13;
    public static final int NUMERO=14;
    public static final int PARENTESIS_ABIERTO=15;
    public static final int PARENTESIS_CERRADO=16;
    public static final int PUNTO_COMA=17;
    public static final int PUNTO_DECIMAL=18;
    public static final int REAL=19;
    public static final int TABULADOR=20;


        //Atributo de la clase analizador lexico que nos permitira
        //resolver los nombres de los tokens.
        TokenCollection to = new TokenCollection();

        /*Clase para resolver los nombre de los Tokens del analizador lexico*/
        public class TokenCollection {
        
            HashMap<Integer, String> tokensNamesAndTypes = null;
            
            public TokenCollection() {
                tokensNamesAndTypes = new HashMap<Integer, String>();
                String nombreFicheroTokens = getGrammarFileName().substring(0, getGrammarFileName().length() - 1) + "tokens";
                inicializarTokens(nombreFicheroTokens);
            }

            public void inicializarTokens(String nombreFicheroTokens) {
                try {
                    FileReader fr = new FileReader(nombreFicheroTokens);
                    BufferedReader br = new BufferedReader(fr);
                    String line = "";
                    String name = "";
                    Integer number = -1;
                    while ((line = br.readLine()) != null) {
                        name = line.substring(0, line.indexOf('='));
                        number = Integer.parseInt(line.substring(line.indexOf('=') + 1, line.length()));
                        tokensNamesAndTypes.put(number, name);
                    }
                    fr.close();
                } catch (FileNotFoundException fnfe) {
                    System.out.println("Error fichero de tokens no encontrado: " + nombreFicheroTokens);
                } catch (IOException ioe) {
                    System.out.println("Error al leer fichero de tokens: " + nombreFicheroTokens);
                }
            }
            
            public String getTokenName(Integer i) {
                return tokensNamesAndTypes.get(i);
            }
        
        }
        /*Clase para resolver los nombre de los Tokens del analizador lexico*/

        /*Clase propia MyToken para manejar los tokens a mis necesidades*/
        public class MyToken extends CommonToken {

            int tipoT;
            String nombreT;
            String lexemaT;
            int lineaT;
            int columnaT;

            public MyToken(CharStream input, int type, int channel, int start, int stop) {
                super(input, type, channel, start, stop);
                tipoT = -1;
                nombreT = "";
                lexemaT = "";
                lineaT = -1;
                columnaT = -1;
            }

            public void setAtributos(String lexema, int linea, int columna) {
                tipoT = getType();
                nombreT = to.getTokenName(tipoT);
                lexemaT = lexema;
                lineaT = linea;
                columnaT = columna;
            }

            @Override
            public String toString() {
                String tipo = Integer.toString(tipoT);
                String linea = Integer.toString(lineaT);
                String columna = Integer.toString(columnaT);
                return '[' + tipo + ", " + nombreT + ", [" + lexemaT + "], " + linea + ", " + columna + ']';
            }

        }
        /*Clase propia MyToken para manejar los tokens a mis necesidades*/

        //Metodo del analizador lexico sobrescrito para que se emita un objeto de
        //la clase MyToken
        @Override
        public Token emit() {
            MyToken my = new MyToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex() - 1);
            my.setAtributos(getText(), getLine(), getCharPositionInLine() - (getText().length() - 1));
            emit(my);
            return my;
        }

        //Lista que guarda los errores que se van produciendo durante el analisis lexico
        List<RecognitionException> errors = new ArrayList<RecognitionException>();

        //Metodo que devuelve la lista de errores que se han producido
        public List<RecognitionException> getAllErrors() {
            return errors;
        }
        
        //Metodo que comprueba si se han producido errores
        public boolean hasErrors() {
            return !errors.isEmpty();
        }

        //Metodo del analizador lexico sobrescrito para que los errores que se van
        //produciendo durante el analisis lexico en vez de mostrarse por consola
        //se guarden en la lista de errores (errors)
        @Override
        public void reportError(RecognitionException e) {
            displayRecognitionError(this.getTokenNames(), e);
            errors.add(e);
        }



    // delegates
    // delegators
    public Lexer[] getDelegates() {
        return new Lexer[] {};
    }

    public BasicLexer() {} 
    public BasicLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public BasicLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);
    }
    public String getGrammarFileName() { return "C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g"; }

    // $ANTLR start "NUEVALINEA_WINDOWS"
    public final void mNUEVALINEA_WINDOWS() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:137:28: ( '\\r\\n' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:137:33: '\\r\\n'
            {
            match("\r\n"); if (state.failed) return ;



            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUEVALINEA_WINDOWS"

    // $ANTLR start "NUEVALINEA_LINUX"
    public final void mNUEVALINEA_LINUX() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:138:26: ( '\\n' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:138:33: '\\n'
            {
            match('\n'); if (state.failed) return ;

            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUEVALINEA_LINUX"

    // $ANTLR start "TABULADOR"
    public final void mTABULADOR() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:139:19: ( '\\t' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:139:33: '\\t'
            {
            match('\t'); if (state.failed) return ;

            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "TABULADOR"

    // $ANTLR start "ESPACIO"
    public final void mESPACIO() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:140:17: ( ' ' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:140:33: ' '
            {
            match(' '); if (state.failed) return ;

            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "ESPACIO"

    // $ANTLR start "DELIMITADORES"
    public final void mDELIMITADORES() throws RecognitionException {
        try {
            int _type = DELIMITADORES;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:14: ( ( NUEVALINEA_WINDOWS | NUEVALINEA_LINUX | TABULADOR | ESPACIO )+ )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:33: ( NUEVALINEA_WINDOWS | NUEVALINEA_LINUX | TABULADOR | ESPACIO )+
            {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:33: ( NUEVALINEA_WINDOWS | NUEVALINEA_LINUX | TABULADOR | ESPACIO )+
            int cnt1=0;
            loop1:
            do {
                int alt1=5;
                switch ( input.LA(1) ) {
                case '\r':
                    {
                    alt1=1;
                    }
                    break;
                case '\n':
                    {
                    alt1=2;
                    }
                    break;
                case '\t':
                    {
                    alt1=3;
                    }
                    break;
                case ' ':
                    {
                    alt1=4;
                    }
                    break;

                }

                switch (alt1) {
            	case 1 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:34: NUEVALINEA_WINDOWS
            	    {
            	    mNUEVALINEA_WINDOWS(); if (state.failed) return ;


            	    }
            	    break;
            	case 2 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:55: NUEVALINEA_LINUX
            	    {
            	    mNUEVALINEA_LINUX(); if (state.failed) return ;


            	    }
            	    break;
            	case 3 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:74: TABULADOR
            	    {
            	    mTABULADOR(); if (state.failed) return ;


            	    }
            	    break;
            	case 4 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:141:86: ESPACIO
            	    {
            	    mESPACIO(); if (state.failed) return ;


            	    }
            	    break;

            	default :
            	    if ( cnt1 >= 1 ) break loop1;
            	    if (state.backtracking>0) {state.failed=true; return ;}
                        EarlyExitException eee =
                            new EarlyExitException(1, input);
                        throw eee;
                }
                cnt1++;
            } while (true);


            if ( state.backtracking==0 ) { skip(); }

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DELIMITADORES"

    // $ANTLR start "DIGITO"
    public final void mDIGITO() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:143:16: ( '0' .. '9' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:
            {
            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                input.consume();
                state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return ;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DIGITO"

    // $ANTLR start "PUNTO_DECIMAL"
    public final void mPUNTO_DECIMAL() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:144:23: ( '.' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:144:33: '.'
            {
            match('.'); if (state.failed) return ;

            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PUNTO_DECIMAL"

    // $ANTLR start "NUMERO"
    public final void mNUMERO() throws RecognitionException {
        try {
            int _type = NUMERO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:7: ( ( ( DIGITO )+ PUNTO_DECIMAL )=> ( DIGITO )+ PUNTO_DECIMAL ( DIGITO )+ | ( DIGITO )+ )
            int alt5=2;
            alt5 = dfa5.predict(input);
            switch (alt5) {
                case 1 :
                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:33: ( ( DIGITO )+ PUNTO_DECIMAL )=> ( DIGITO )+ PUNTO_DECIMAL ( DIGITO )+
                    {
                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:60: ( DIGITO )+
                    int cnt2=0;
                    loop2:
                    do {
                        int alt2=2;
                        int LA2_0 = input.LA(1);

                        if ( ((LA2_0 >= '0' && LA2_0 <= '9')) ) {
                            alt2=1;
                        }


                        switch (alt2) {
                    	case 1 :
                    	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:
                    	    {
                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                    	        input.consume();
                    	        state.failed=false;
                    	    }
                    	    else {
                    	        if (state.backtracking>0) {state.failed=true; return ;}
                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        recover(mse);
                    	        throw mse;
                    	    }


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt2 >= 1 ) break loop2;
                    	    if (state.backtracking>0) {state.failed=true; return ;}
                                EarlyExitException eee =
                                    new EarlyExitException(2, input);
                                throw eee;
                        }
                        cnt2++;
                    } while (true);


                    mPUNTO_DECIMAL(); if (state.failed) return ;


                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:82: ( DIGITO )+
                    int cnt3=0;
                    loop3:
                    do {
                        int alt3=2;
                        int LA3_0 = input.LA(1);

                        if ( ((LA3_0 >= '0' && LA3_0 <= '9')) ) {
                            alt3=1;
                        }


                        switch (alt3) {
                    	case 1 :
                    	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:
                    	    {
                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                    	        input.consume();
                    	        state.failed=false;
                    	    }
                    	    else {
                    	        if (state.backtracking>0) {state.failed=true; return ;}
                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        recover(mse);
                    	        throw mse;
                    	    }


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt3 >= 1 ) break loop3;
                    	    if (state.backtracking>0) {state.failed=true; return ;}
                                EarlyExitException eee =
                                    new EarlyExitException(3, input);
                                throw eee;
                        }
                        cnt3++;
                    } while (true);


                    if ( state.backtracking==0 ) {_type = REAL;}

                    }
                    break;
                case 2 :
                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:146:60: ( DIGITO )+
                    {
                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:146:60: ( DIGITO )+
                    int cnt4=0;
                    loop4:
                    do {
                        int alt4=2;
                        int LA4_0 = input.LA(1);

                        if ( ((LA4_0 >= '0' && LA4_0 <= '9')) ) {
                            alt4=1;
                        }


                        switch (alt4) {
                    	case 1 :
                    	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:
                    	    {
                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                    	        input.consume();
                    	        state.failed=false;
                    	    }
                    	    else {
                    	        if (state.backtracking>0) {state.failed=true; return ;}
                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        recover(mse);
                    	        throw mse;
                    	    }


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt4 >= 1 ) break loop4;
                    	    if (state.backtracking>0) {state.failed=true; return ;}
                                EarlyExitException eee =
                                    new EarlyExitException(4, input);
                                throw eee;
                        }
                        cnt4++;
                    } while (true);


                    if ( state.backtracking==0 ) {_type = INTEGER;}

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUMERO"

    // $ANTLR start "PUNTO_COMA"
    public final void mPUNTO_COMA() throws RecognitionException {
        try {
            int _type = PUNTO_COMA;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:148:11: ( ';' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:148:33: ';'
            {
            match(';'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PUNTO_COMA"

    // $ANTLR start "MAS"
    public final void mMAS() throws RecognitionException {
        try {
            int _type = MAS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:150:4: ( '+' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:150:33: '+'
            {
            match('+'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "MAS"

    // $ANTLR start "MENOS"
    public final void mMENOS() throws RecognitionException {
        try {
            int _type = MENOS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:151:6: ( '-' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:151:33: '-'
            {
            match('-'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "MENOS"

    // $ANTLR start "DIV"
    public final void mDIV() throws RecognitionException {
        try {
            int _type = DIV;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:152:4: ( '/' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:152:33: '/'
            {
            match('/'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DIV"

    // $ANTLR start "MULT"
    public final void mMULT() throws RecognitionException {
        try {
            int _type = MULT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:153:5: ( '*' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:153:33: '*'
            {
            match('*'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "MULT"

    // $ANTLR start "PARENTESIS_ABIERTO"
    public final void mPARENTESIS_ABIERTO() throws RecognitionException {
        try {
            int _type = PARENTESIS_ABIERTO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:155:19: ( '(' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:155:33: '('
            {
            match('('); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PARENTESIS_ABIERTO"

    // $ANTLR start "PARENTESIS_CERRADO"
    public final void mPARENTESIS_CERRADO() throws RecognitionException {
        try {
            int _type = PARENTESIS_CERRADO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:156:19: ( ')' )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:156:33: ')'
            {
            match(')'); if (state.failed) return ;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PARENTESIS_CERRADO"

    public void mTokens() throws RecognitionException {
        // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:8: ( DELIMITADORES | NUMERO | PUNTO_COMA | MAS | MENOS | DIV | MULT | PARENTESIS_ABIERTO | PARENTESIS_CERRADO )
        int alt6=9;
        switch ( input.LA(1) ) {
        case '\t':
        case '\n':
        case '\r':
        case ' ':
            {
            alt6=1;
            }
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt6=2;
            }
            break;
        case ';':
            {
            alt6=3;
            }
            break;
        case '+':
            {
            alt6=4;
            }
            break;
        case '-':
            {
            alt6=5;
            }
            break;
        case '/':
            {
            alt6=6;
            }
            break;
        case '*':
            {
            alt6=7;
            }
            break;
        case '(':
            {
            alt6=8;
            }
            break;
        case ')':
            {
            alt6=9;
            }
            break;
        default:
            if (state.backtracking>0) {state.failed=true; return ;}
            NoViableAltException nvae =
                new NoViableAltException("", 6, 0, input);

            throw nvae;

        }

        switch (alt6) {
            case 1 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:10: DELIMITADORES
                {
                mDELIMITADORES(); if (state.failed) return ;


                }
                break;
            case 2 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:24: NUMERO
                {
                mNUMERO(); if (state.failed) return ;


                }
                break;
            case 3 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:31: PUNTO_COMA
                {
                mPUNTO_COMA(); if (state.failed) return ;


                }
                break;
            case 4 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:42: MAS
                {
                mMAS(); if (state.failed) return ;


                }
                break;
            case 5 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:46: MENOS
                {
                mMENOS(); if (state.failed) return ;


                }
                break;
            case 6 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:52: DIV
                {
                mDIV(); if (state.failed) return ;


                }
                break;
            case 7 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:56: MULT
                {
                mMULT(); if (state.failed) return ;


                }
                break;
            case 8 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:61: PARENTESIS_ABIERTO
                {
                mPARENTESIS_ABIERTO(); if (state.failed) return ;


                }
                break;
            case 9 :
                // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:1:80: PARENTESIS_CERRADO
                {
                mPARENTESIS_CERRADO(); if (state.failed) return ;


                }
                break;

        }

    }

    // $ANTLR start synpred1_BasicLexer
    public final void synpred1_BasicLexer_fragment() throws RecognitionException {
        // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:33: ( ( DIGITO )+ PUNTO_DECIMAL )
        // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:34: ( DIGITO )+ PUNTO_DECIMAL
        {
        // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:145:34: ( DIGITO )+
        int cnt7=0;
        loop7:
        do {
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( ((LA7_0 >= '0' && LA7_0 <= '9')) ) {
                alt7=1;
            }


            switch (alt7) {
        	case 1 :
        	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\BasicLexer\\BasicLexer.g:
        	    {
        	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
        	        input.consume();
        	        state.failed=false;
        	    }
        	    else {
        	        if (state.backtracking>0) {state.failed=true; return ;}
        	        MismatchedSetException mse = new MismatchedSetException(null,input);
        	        recover(mse);
        	        throw mse;
        	    }


        	    }
        	    break;

        	default :
        	    if ( cnt7 >= 1 ) break loop7;
        	    if (state.backtracking>0) {state.failed=true; return ;}
                    EarlyExitException eee =
                        new EarlyExitException(7, input);
                    throw eee;
            }
            cnt7++;
        } while (true);


        mPUNTO_DECIMAL(); if (state.failed) return ;


        }

    }
    // $ANTLR end synpred1_BasicLexer

    public final boolean synpred1_BasicLexer() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred1_BasicLexer_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }


    protected DFA5 dfa5 = new DFA5(this);
    static final String DFA5_eotS =
        "\1\uffff\1\3\2\uffff";
    static final String DFA5_eofS =
        "\4\uffff";
    static final String DFA5_minS =
        "\1\60\1\56\2\uffff";
    static final String DFA5_maxS =
        "\2\71\2\uffff";
    static final String DFA5_acceptS =
        "\2\uffff\1\1\1\2";
    static final String DFA5_specialS =
        "\1\uffff\1\0\2\uffff}>";
    static final String[] DFA5_transitionS = {
            "\12\1",
            "\1\2\1\uffff\12\1",
            "",
            ""
    };

    static final short[] DFA5_eot = DFA.unpackEncodedString(DFA5_eotS);
    static final short[] DFA5_eof = DFA.unpackEncodedString(DFA5_eofS);
    static final char[] DFA5_min = DFA.unpackEncodedStringToUnsignedChars(DFA5_minS);
    static final char[] DFA5_max = DFA.unpackEncodedStringToUnsignedChars(DFA5_maxS);
    static final short[] DFA5_accept = DFA.unpackEncodedString(DFA5_acceptS);
    static final short[] DFA5_special = DFA.unpackEncodedString(DFA5_specialS);
    static final short[][] DFA5_transition;

    static {
        int numStates = DFA5_transitionS.length;
        DFA5_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA5_transition[i] = DFA.unpackEncodedString(DFA5_transitionS[i]);
        }
    }

    class DFA5 extends DFA {

        public DFA5(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 5;
            this.eot = DFA5_eot;
            this.eof = DFA5_eof;
            this.min = DFA5_min;
            this.max = DFA5_max;
            this.accept = DFA5_accept;
            this.special = DFA5_special;
            this.transition = DFA5_transition;
        }
        public String getDescription() {
            return "145:1: NUMERO : ( ( ( DIGITO )+ PUNTO_DECIMAL )=> ( DIGITO )+ PUNTO_DECIMAL ( DIGITO )+ | ( DIGITO )+ );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            IntStream input = _input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA5_1 = input.LA(1);

                         
                        int index5_1 = input.index();
                        input.rewind();

                        s = -1;
                        if ( (LA5_1=='.') && (synpred1_BasicLexer())) {s = 2;}

                        else if ( ((LA5_1 >= '0' && LA5_1 <= '9')) ) {s = 1;}

                        else s = 3;

                         
                        input.seek(index5_1);

                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}

            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 5, _s, input);
            error(nvae);
            throw nvae;
        }

    }
 

}